body > section#wrapper {

  div.toggleAreaDesc {
    @include mask('icon-info', $textColorLight, 32px);
    position: relative;

    &::before {
      top: 18px;
      left: 0;
      width: 32px;
      height: 32px;
    }

    &.hidden {
      display: none;
    }

    > p {
      padding: 3px 0 3px 40px;
      line-height: 150%;
    }

    > a {
      margin: 10px 0 0 40px;
    }
  }
}

body > div.toggleAreaModal {
  @extend %hidden;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  padding: 90px 25px 20px;
  width: 600px;
  height: 480px;
  background: $contentBackground;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  z-index: 97;
  transform: scale(0.7);
  transition: transform 0.3s, opacity 0.3s;

  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-image: img('settings/mockup-left.png'), img('settings/mockup-right.png'), img('settings/mockup-middle.png');
    background-repeat: no-repeat, no-repeat, repeat-x;
    background-position: left 0, right 0, left 0;
    background-size: auto 60px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    z-index: 2;
  }

  > div.preview {
    position: absolute;
    top: 60px;
    width: 20px;
    height: calc(100% - 60px);

    > div {
      @include mask('icon-bookmark', $textColorInverted, 100%);
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      transition: width 0.2s, height 0.2s, top 0.2s, border-radius 0.2s;
      cursor: ns-resize;

      &.fullHeight {
        cursor: default;
      }

      &.dragging {
        transition: none;
      }
    }

    > span {
      @include mask('icon-arrow-sketch', $textColor, 100%);
      position: absolute;
      top: 0;
      display: block;
      white-space: nowrap;
      padding: 8px;
      font-size: 90%;
      font-weight: $__fontWeightMedium;
      transition: opacity 0.3s;
      @extend %hidden;

      &::before {
        width: 26px;
        -webkit-mask-position: 0 -4px;
      }
    }

    > div:not(.fullHeight) ~ span {
      @extend %visible;
    }
  }

  > div.hidden {
    display: none;
  }

  > p.buttons {
    margin: 40px 0 0 0;

    > a {
      cursor: pointer;
      vertical-align: top;
      margin: 0;

      &.cancel {
        margin: 7px 0 0 10px;
        display: inline-block;
      }

      &.save {
        @extend %highlightButton;
      }
    }
  }

  &[data-type='left'] {
    padding-left: 75px;

    > div.preview {
      left: 0;

      > div:not(.fullHeight) {
        border-radius: 0 12px 12px 0;
      }

      > span {
        padding-left: 32px;
        left: calc(100% + 3px);

        &::before {
          transform: scaleX(-1) scaleY(-1);
        }
      }
    }
  }

  &[data-type='right'] {
    padding-right: 75px;

    > div.preview {
      right: 0;

      > div:not(.fullHeight) {
        border-radius: 12px 0 0 12px;
      }

      > span {
        padding-right: 32px;
        right: calc(100% + 3px);

        &::before {
          transform: scaleY(-1);
          left: unset;
          right: 0;
        }
      }
    }
  }
}

body.showModal {

  &::before {
    opacity: 1;
  }

  > * {
    pointer-events: none;
  }

  > div.toggleAreaModal {
    @extend %visible;
    transform: scale(1);
    z-index: 99;
  }
}

@import "../../rtl/include/settings/toggleAdvanced";